CLIPBOARD

The CLIPBOARD class provides methods to access the system clipboard. Because these are implemented as static methods, you do not need to create an instance of the class.

Methods

Examples

First copy some text from a different application on your system. Then enter the following commands to retrieve and print the current text:

result = Clipboard.Get()

print, result

Now add your own text to the system clipboard:

Clipboard.Set, "IDL is fun!"

You should now be able to paste this text into a different application on your system.

Clipboard::Get

The Clipboard::Get method returns the text from the system clipboard.

Syntax

Result = Clipboard.Get( )

Return Value

Returns a scalar string or string array containing the current contents of the system clipboard.

Arguments

None.

Keywords

None.

Clipboard::Set

The Clipboard::Set method sets the system clipboard to the value of a supplied scalar or array string argument.

Syntax

Clipboard.Set, Text

Arguments

Text

A scalar string or string array. If Text is a string array then the strings will be added to the system clipboard as a single string with the appropriate newline characters separating each string.

Keywords

None.

Version History

8.3

Introduced

See Also

Static Methods